We can just use gtk_drag_source_set_icon_name.
static void
set_image (GtkWidget *image, const gchar *name, gint size)
{
- GdkPixbuf *pixbuf;
-
gtk_image_set_from_icon_name (GTK_IMAGE (image), name);
gtk_image_set_pixel_size (GTK_IMAGE (image), size);
- pixbuf = get_icon (image, name, size);
- gtk_drag_source_set_icon_pixbuf (image, pixbuf);
- g_object_unref (pixbuf);
+ gtk_drag_source_set_icon_name (image, name);
}
static void
*
* The ::drag-begin signal is emitted on the drag source when a drag is
* started. A typical reason to connect to this signal is to set up a
- * custom drag icon with e.g. gtk_drag_source_set_icon_pixbuf().
+ * custom drag icon with e.g. gtk_drag_source_set_icon_surface().
*
* Note that some widgets set up a drag icon in the default handler of
* this signal, so you may have to use g_signal_connect_after() to